package com.bawie.SpringbootApplication.controller;


import com.bawie.entity.TStudent;
import com.bawie.service.TStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class TvController {

        @Autowired
        private TStudentService tStudentService;

   @RequestMapping("/list")
    public String list(ModelMap modelMap) {
       List<TStudent> students=tStudentService.selectByCondition(new TStudent());
       modelMap.put("students",students);
        return "list";
    }
}
